﻿/**************************************************************
 *
 * 唯一标识：698d5fc9-560a-4751-8142-29c528a8e7fb
 * 命名空间：Sgr.UPMS.Application.Validations.Departments
 * 创建时间：2023/8/27 20:38:42
 * 机器名称：DESKTOP-S0D075D
 * 创建者：antho
 * 电子邮箱：fengqinhua2016@163.com
 * 描述：
 *
 **************************************************************/

using FluentValidation;
using Sgr.UPMS.Application.Commands.Departments;

namespace Sgr.UPMS.Application.Validations.Departments
{
    /// <summary>
    /// 删除部门命令验证器
    /// </summary>
    public class DeleteDepartmentCommandValidator : AbstractValidator<DeleteDepartmentCommand>
    {
        public DeleteDepartmentCommandValidator()
        {
            RuleFor(command => command.DepartmentId)
                .GreaterThan(0)
                .WithMessage("部门标识必须大于0");
        }
    }
}